<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>

<div id="app">
    <div id="example">
        <button v-on:click="counter +=1">数量:{{counter}}</button>
        <button v-on:click="greet('abc',$event)">打招呼</button>
    </div>
</div>

<script>
    var app = new Vue({
        el: '#app',
        data: {
            counter: 0
        },
        methods:{
            greet: function(str,e){
                alert(str);
                console.log(e);
            }
        }
    })
</script>
